/*
 * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 *
 * This file is part of Harmattan SmashMiner OpenGL game application.
 * 
 * Harmattan SmashMiner OpenGL Example Application version 1.0.0
 *  
 * Latest update: 15.4.2011
 *
 * The Harmattan SmashMiner OpenGL example application demonstrates how to use 
 * the OpenGL ES in Harmattan devices.
 *
 * This example is provided as a starting point for 3rd party
 * developers (you) to ease the implementation of OpenGL based 
 * games. Ideas, parts of code or methodologies that this
 * example application uses can be freely used without restrictions.
 *
 * See file README.txt how to build and compile this example application
 * in the Harmattan SDK environment. 
 * 
 * See file INSTALL.txt to find out what is required to run this
 * application and how to install the application to the device or
 * alternatively in QEMU-emulator.
 *
 * The LICENSE.txt file explains the license this software is provided
 * with. A copy of the same license is included in this source file.
 * 
 */

/*
 * Copyright (C) 2011 by Nokia Corporation.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

#ifndef VISUALEFFECTDATA_H
#define VISUALEFFECTDATA_H

#include "defines.h"

class VisualEffectData
{
public:

    VisualEffectData(FPtype posX, FPtype posY);

    /// Get X position of effect
    inline FPtype posX() const { return positionX; };
    /// Get Y position of effect
    inline FPtype posY() const { return positionY; };

private:

    FPtype positionX;
    FPtype positionY;
};

class HyperJumpEffectData : public VisualEffectData
{
public:

    HyperJumpEffectData(FPtype posX, FPtype posY, bool);
    /// Is miner transforming in the hyper jump (hyper jump effect graphics will be rendered)
    inline bool isTransforming() const { return transforming; }
    /// Is miner hidden
    inline bool isHidden() const { return hidden; };
    /*! Set the miner hyper jump status, set to true if miner is tranforming in the hyper jump
     * (hyper jump graphics effect will be rendered) 
     */
    inline void setTransforming(bool transforming) { this->transforming = transforming; }
    /// Set is miner hidden
    inline void setHidden(bool hidden) { this->hidden = hidden; };

#ifdef SMASHMINER_CONFIG_ENABLE_DEBUG_CHECKS
    inline bool isRewind() const { return rewind; };
    inline void setRewind() { this->rewind = true; };
#endif  // SMASHMINER_CONFIG_ENABLE_DEBUG_CHECKS

private:
    /// Is miner tranforming in the hyper jump (hyper jump effect graphics will be rendered)
    bool transforming;
    /// Is miner hidden
    bool hidden;

#ifdef SMASHMINER_CONFIG_ENABLE_DEBUG_CHECKS
    bool rewind;
#endif  // SMASHMINER_CONFIG_ENABLE_DEBUG_CHECKS
};

class BombEffectData : public VisualEffectData
{
public:

    BombEffectData(FPtype posX, FPtype posY);

    /// Gets radius of the bomb effect shockwave
    inline FPtype shockwaveRadius() { return shockRadius; };
    /// Gets radius of the bomb effect lightwave
    inline FPtype lightwaveRadius() { return lightRadius; };
    /// Sets radius of the bomb effect shockwave
    inline void setShockwaveRadius(FPtype shockRadius) { this->shockRadius = shockRadius; };
    /// Sets radius of the bomb effect lightwave
    inline void setLightwaveRadius(FPtype lightRadius) { this->lightRadius = lightRadius; };

private:
    /// Shockwave radius
    FPtype shockRadius;
    /// Lightwave radius
    FPtype lightRadius;
};

#endif // VISUALEFFECTDATA_H
